#include "bump.h"
#include "esp_log.h"
uint16_t bump_temp=0;
void extract(){
    bump_temp=ADS1115_ReadVoltage(3);
    ESP_LOGI("BUMP","%u",bump_temp);
    if (bump_temp<=6900)return;



    if (bump_temp>6900){
        relay_control(0,1);

    }
    
    while (bump_temp>6900)  {/////////////////////////////////
        bump_temp=ADS1115_ReadVoltage(3);
        // ESP_LOGI("BUMP","%u",bump_temp);
        vTaskDelay(pdMS_TO_TICKS(50));
    }
    relay_control(0,0);
        
}
void extract2(){
    // ESP_LOGI("BUMP","%u",bump_temp);
    if (bump_temp<=6900)return;



    if (bump_temp>6900){
        relay_control(0,1);

    }
    
    while (bump_temp>6900)  {/////////////////////////////////
        // ESP_LOGI("BUMP","%u",bump_temp);
        vTaskDelay(pdMS_TO_TICKS(50));
    }
    relay_control(0,0);
        
}